#
# Be sure to run `pod lib lint SWWeexDefaultPlugins.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
    s.name             = 'SWWeexDefaultPlugins'
    s.version          = '0.0.9'
    s.summary          = 'for SweetWeexKit Plugin，主要存放SweetWeexKit一些工具handler、module、'
  
    s.description      = <<-DESC
    TODO: for SweetWeexKit Plugin，主要存放SweetWeexKit一些工具handler、module；为SweetWeexKit插件集合
    DESC
    
#    s.homepage         = 'http://git.evun.cn/ADMP-repository/Sweet-iOS-SWWeexDefaultPlugins'
    s.homepage         = 'https://gitlab.geely.com/p-admp/ios-common-kit/ios-sweetweexplugin'

    # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
    s.license          = { :type => 'MIT', :file => 'LICENSE' }
    s.author           = { '朱帅帅' => 'shuaishuai.zhu@geely.com' }
    
    s.ios.deployment_target = '9.0'

    s.static_framework = true
#    library_type       = "Dynamic"

#  if ENV['mode'].to_s.include? "SWWeexDefaultPlugins"
      #使用zip成果物模式
      puts "SWWeexDefaultPlugins成果物模式集成".blue
      s.source           = { :http => 'https://geely-admp-oss.oss-cn-hangzhou.aliyuncs.com/sweet-app-release/ios/SWWeexDefaultPlugins.framework-0.0.9.zip' }
      s.ios.vendored_framework   = 'SWWeexDefaultPlugins.framework'
      
#  else
#      #目前默认源码集成
#      puts "SWWeexDefaultPlugins源码模式集成".yellow
#      s.source           = { :git => 'https://devops.geely.com/Products/AGP/_git/sweet-ios-weex-common-plugins', :tag => s.version.to_s }
#      s.source_files = 'SWWeexDefaultPlugins/Classes/**/*.{h,m}'
#      s.ios.public_header_files  = 'SWWeexDefaultPlugins/Classes/**/*.h'
#
#  end
    

    # Weex插件库
    s.dependency 'WeexActionSheet'
    s.dependency 'WeexNatCamera'
    s.dependency 'WeexNatStream'
    s.dependency 'WeexNatGeolocation'
    s.dependency 'WeexNatDeviceNetwork'
    s.dependency 'WeexNatDeviceVibration'
    s.dependency 'WeexNatDeviceInfo'
    s.dependency 'WeexNatDeviceScreen'
    s.dependency 'WeexNatSensorAccelerometer'
    s.dependency 'WeexNatSensorCompass'
    s.dependency 'WeexNatRecorder'
    s.dependency 'WeexNatModal'
    s.dependency 'WeexNatMediaVideo'
    s.dependency 'WeexNatMediaAudio'
    s.dependency 'WeexNatTransfer'
    s.dependency 'WeexNatCommunication'
    s.dependency 'WeexNatDeviceBattery'
   

    s.dependency 'WeexPluginLoader'

    s.dependency 'SWFramework'
    s.dependency 'SWWeexKit'
    s.dependency 'SWNetworkKit'
    #------------------ 组件info配置 --------------------------
    #s.pod_target_xcconfig = { 'ENABLE_BITCODE' => 'NO' }
    # 设置target不支持bitcode

    s.pod_target_xcconfig  = {
      'FRAMEWORK_SEARCH_PATHS'        => '$(inherited) ${PODS_ROOT}/**',
      'LIBRARY_SEARCH_PATHS'          => '$(inherited) ${PODS_ROOT}/**',
      'OTHER_LDFLAGS'                 => '$(inherited) -ObjC',
      'STRINGS_FILE_OUTPUT_ENCODING'  => 'UTF-8',
      'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
      'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64'
    }
    s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
end
